<template>
  <div class="index">
    <!-- 顶部导航栏 -->
    <div>
      <Menu />
    </div>

    <div class="content">
      <router-view/>
    </div>

    <div class="footer">
      <MyFooter font-color="#666"/>
    </div>
  </div>
</template>

<script setup lang="ts">
import Menu from "@/components/Menu.vue";
import MyFooter from "@/components/MyFooter.vue";
</script>

<style lang="less" scoped>
.index {
  width: 100%;
  background-color: #f2f2f4;
  display: flex; /* 改为flex布局，便于后续实现footer固定在底部 */
  flex-direction: column;
  min-height: 100vh; /* 确保.index至少占满一屏高度 */
  .content {
    width: 100%;
    height: 100%;
    //min-height: 100%; /* 调整min-height，避免内容区域超过.index的高度 */
    padding: 10px 80px;
    box-sizing: border-box; // 确保padding在宽度计算中生效
    z-index: 20;
  }
  .footer {
    margin-top: auto; /* 使footer推至flex容器底部 */
    background-color: #FFF;
  }
  @media screen and (max-width: 768px) {
    .content {
      padding: 5px 20px;
    }
  }
  @media screen and (min-width: 1600px) {
    .content {
      padding: 10px 180px;
    }
  }
}
</style>
